package com.yf.service.article;

import com.yf.entity.ShareEntity;
import com.yf.entity.UserEntity;
import com.yf.service.BaseService;
import com.yf.vo.ShareBackVo;
import com.yf.vo.ShareVo;

import java.util.List;
import java.util.Map;

/**
 * 分享Service接口
 *
 * @author hxf
 * @email 505860922@qq.com
 * @date Tue Aug 21 10:46:07 CST 2018
 */
public interface ShareService extends BaseService<ShareEntity>{

    /**
     * 渲染文章，点击别人分享进来的
     * @param shareId
     * @return
     */
    ShareVo showArticle(Long shareId,Long userId);

    /**
     * 渲染文章，点击公司文章列表进来的
     * @param
     * @return
     */
    ShareVo showArticleByArticleId(Long articleId,Long userId);

    /**
     * 点赞
     * @param articleId
     * @param userId
     * @return
     */
    Map thumbUp(Long articleId, Long userId);

    /**
     * 修改用户信息并生成分享
     * @param
     * @param
     * @return
     */
    ShareEntity createShare(Long userId,Long articleId,String phone,String name,String qrcode,String info);


    /**
     * back 分享记录
     * @param params
     * @return
     */
    List<ShareBackVo> findShareRecord(Map<String, Object> params);

}
